<?php

class Zend_View_Helper_GetGroupName extends Zend_Controller_Action_Helper_Abstract {

    public $view;

    public function getGroupName($groupId) {
        $groupModel = new Admin_Model_Groups();
        $group = $groupModel->fetchRow('id=' . $groupId)->toArray();
        if (!$group)
            return '';
        return $group['name'];
    }

    public function setView(Zend_View_Interface $view) {
        $this->view = $view;
    }
}